cmake_minimum_required(VERSION 3.16)

project(AsyncLogSystem)

set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_STANDARD_REQUIRED ON)

set(SOURCES_FILES
    src/Util.cpp
    src/Buffer.cpp
    src/AsyncWorker.cpp
    src/AsyncLogger.cpp
    src/AsyncLogSystem.cpp
    src/LogFlush.cpp
    src/LogFormatter.cpp
)

include_directories(include)

configure_file(async_log_system.conf ${CMAKE_BINARY_DIR}/async_log_system.conf COPYONLY)

add_library(AsyncLogSystem SHARED ${SOURCES_FILES})
target_link_libraries(AsyncLogSystem jsoncpp pthread)